/*
This source file is subject to the GPLv3 license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://www.gnu.org/licenses/gpl.txt
*/

#include "RunTestPlanDialog.h"
#include "ui_RunTestPlanDialog.h"

RunTestPlanDialog::RunTestPlanDialog(QWidget *parent)
    : QDialog(parent), ui(new Ui::RunTestPlanDialog)
{
    ui->setupUi(this);
    ResetDisplay();
}

RunTestPlanDialog::~RunTestPlanDialog()
{
    delete ui;
}

void RunTestPlanDialog::ResetDisplay()
{

    this->setWindowTitle(tr("Run Test Plan - New Test Plan"));

    ui->txtlineTestPlanName->setText(tr("New Test Plan"));
    ui->txtlineTesPlanVersion->setText(tr("(Non-versioned)"));
    ui->txtplainTestPlanRemarks->setPlainText(tr(""));

    ui->txtlineStartTime->setText(tr(""));
    ui->txtlineStopTime->setText(tr(""));
    ui->txtlineResult->setText(tr(""));
    ui->txtlineStatus->setText(tr(""));

    ui->btnStartTest->setEnabled(true);
    ui->btnStopTest->setEnabled(false);
    ui->btnViewReport->setEnabled(false);

    /*
    ui->btnlinkTestCaseVersion->setEnabled(false);
    ui->btnDeleteMsgComm->setEnabled(false);
    ui->btnOpenMsgComm->setEnabled(false);

    // Reset the table of Message Communication List.
    // 3 colums: Msg to be Send, Msg to be Receive, Condition to Proceed.
    ui->tableMsgCommList->setRowCount(0);
    ui->tableMsgCommList->setColumnCount(3);

    ui->tableMsgCommList->setColumnWidth(0, 140);
    ui->tableMsgCommList->setColumnWidth(1, 140);
    ui->tableMsgCommList->setColumnWidth(2, 120);
    */
}

// Slots
void RunTestPlanDialog::on_btnClose_clicked()
{
    close();
}
